package com.magnificent.panda.model.entity;

import java.io.Serializable;

/**
 * User: Babanin
 * Date: 13.03.2010
 * Time: 1:32:44
 */
public class FlowEvent implements Comparable<FlowEvent>, Serializable {
    private long id;
    private long value;
    private String description;

    public FlowEvent() {
    }

    public FlowEvent(long id, long value) {
        this.id = id;
        this.value = value;
    }

    public FlowEvent(long id, long value, String description) {
        this.id = id;
        this.value = value;
        this.description = description;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getValue() {
        return value;
    }

    public void setValue(long value) {
        this.value = value;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int compareTo(FlowEvent o) {
        return (int) (getValue() - o.getValue());
    }

    @Override
    public String toString() {
        return getDescription();
    }

    public FlowEvent copy(){
        return new FlowEvent(id, value, description);
    }
}

  /* converted to utf8 */